//
//  NetworkDataSource.swift
//  
//
//  Created by tank on 2021/11/23.
//

import Foundation

public protocol NetworkDataSource: AnyObject {
    typealias RefreshTokenCompletion = (_ result: Bool) -> Void
    typealias InvalidTokenCompletion = (_ result: Bool) -> Void
    
    func getToken(network: Network) -> String?

    func getTokenType(network: Network) -> String?
    
    func getAppID(network: Network) -> String?
    
    func getHeaders(network: Network) -> [String: String]?
    
    func refreshToken(url: String?, _ completion: RefreshTokenCompletion?)
    
    func invalidToken(message: String?, _ completion: InvalidTokenCompletion?)
    
    func secCertificates() -> [(host: String, certs: [SecCertificate])]?
    
    func reachabiltyHost() -> String?
}
